package cn.webrx;
import static java.lang.Math.pow;
public class DemoStatic {
    static {
        System.out.println("静态程序块1");
    }

    static int AGE = 18;
    int num = 16;

    static int pf(int i){

        return i*i;
    }

    public static void main(String[] args) {
        System.out.println(pow(2,3));
        System.out.println(AGE);

        var ds = new DemoStatic();
        System.out.println(ds.pf(3));
        System.out.println(ds.num);

        System.out.println(pf(3));
        System.out.println(DemoStatic.pf(6));

    }

    static {
        System.out.println("静态程序块2");
    }
}
